package singleton.lazy.insecurity;

public class SingletonTest {

    public static void main(String[] args) {
        System.out.println("有缺点的懒汉式   线程不安全");
        Singleton instance1 = Singleton.getInstance();
        Singleton instance2 = Singleton.getInstance();
        System.out.println(instance1 == instance2);
        System.out.println(instance1.hashCode());
        System.out.println(instance2.hashCode());
    }
}
